package org.example.edusmart.service;

import org.example.edusmart.pojo.WorkAnswerPojo;
import org.example.edusmart.pojo.WorkPojo;
import org.example.edusmart.request.TeaOrStu.VerifyPojo;

import java.util.HashMap;
import java.util.List;

public interface WorkService {

    /**
     * 校验教师或学生参与教学活动的权限
     * @param verify
     * @return
     */
    Integer verifyWork(VerifyPojo verify);

    /**
     * 教师布置作业
     * @param work
     * @return
     */
    void assignWork(WorkPojo work);

    /**
     * 联系课程和作业
     * @param courseId
     * @param workId
     */
    void linkWork(int courseId, int workId);


    /**
     * 查看课程的作业列表
     * @param courseId
     * @return
     */
    List<HashMap<String, Object>> getWork(int courseId);

    /**
     * 学生提交作业
     *
     * @param answer
     */
    void handWork(WorkAnswerPojo answer);


    /**
     * 审阅作业答案，批改作业
     * @param workanswerId
     * @return
     */
    List<HashMap<String, Object>> correctWork(int workanswerId);

    /**
     * 作业给分
     * @param workanswerId
     * @param grade
     */
    void scoreWork(int workanswerId, int grade);

    Integer getWorkGrade(int workId, int userId);

    Integer getWorkStatus(int workId, int userId);

    List<HashMap<String, Object>> getUncorrectedWork(int workId);

    void rehandWork(WorkAnswerPojo answer);
}
